import numpy as np
def motor_angle_clip(theta = np.zeros(6)):
    theta_clip = np.zeros(6)
    theta_clip[0] = np.clip(theta[0], -np.pi/3, np.pi/3)
    theta_clip[1] = np.clip(theta[1], -1.5, 1.5)
    theta_clip[2] = np.clip(theta[2], -1.5, 1.5)
    theta_clip[3] = np.clip(theta[3], -(2*np.pi-0.1), (2*np.pi-0.1))
    theta_clip[4] = np.clip(theta[4], -1.5, 1.5)
    theta_clip[5] = np.clip(theta[5], -(2*np.pi-0.1), (2*np.pi-0.1))

    return theta_clip